- if part = Ekylibre::Navigation.part_of(controller.controller_path, action_name)
  - current = Ekylibre::Navigation.reverse(controller.controller_path, action_name) || {}
  - part.children.each do |group|
    - side_menu(group.name, title: group.human_name, icon: group.icon, active: !!(current[:group] == group)) do |m|
      - group.children.each do |item|
        - if current_user and current_user.can_access?(item.default_page.to_hash)
          - attrs = {title: item.human_name}
          - attrs[:active] = true if item == current[:item]
          - m.link(item, item.default_page.to_hash, attrs)

- snippet :user, title: Entity.of_company.full_name do
  %ul
    %li= link_to(current_user.person.full_name, backend_myself_path, :class => :user)
    %li= link_to(Authentication::SessionsController.human_action_name(:destroy), destroy_user_session_path, :method => :delete)
- add_snippets(:side)
